package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.EcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author:let_free
 * @Date:2024/11/18/13:36
 **/
@RestController
@RequestMapping("/ec")
public class EcContoller {

    @Autowired
    private EcService ecService;


    /**
     * @param type ：rain/rh/tem
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @description 获取默认的第一张图片路径
     * @author let_free
     * @date 2024/11/18 13:41
     */
    @GetMapping("/getDefaultPath")
    public AjaxResult getDefaultPath(@RequestParam("type") String type, @RequestParam(value = "queryTime",required = false) String queryTime) {
        return AjaxResult.success(ecService.getDefaultImage(type,queryTime));
    }
}
